﻿using System;
using Microsoft.Samples.ServiceHosting.StorageClient;

namespace BackupObjects.Taging
{
    /// <summary>
    /// Tag entity.
    /// </summary>
    public class Tag
    {
        /// <summary>
        /// Gets or sets the id of tag.
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// Gets or sets the name of the tag.
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the id of parent tag.
        /// </summary>
        public Guid? Parent { get; set; }

        public override string ToString()
        {
            return Name;
        }

        public static implicit operator Guid(Tag tag)
        {
            return tag.Id;
        }
    }
}